ONE DESWIK v1.0.0

Add-Ons

Variables and components specifically requested by developers. These extend the core system and the product layer without belonging in either — small, sharp utilities that come from real product feedback.

Everything on this page lives in src/addons.css. Link that file after the foundation, product, and Font Awesome stylesheets to use these classes on any page.

Tertiary Button

A third button weight for actions that sit below Default in importance. Text-only, or text with an icon. It reads as a quieter alternative without competing for attention with the primary call-to-action. Background and border are --gray-3; text is --gray-10.

Variant

In context with the other variants

States

Usage

  • Use for low-emphasis actions where Default would feel too prominent — typically a third action in a button cluster.
  • Tertiary buttons are text-only. If the action needs an icon, choose a different variant.
  • The visual weight is intentionally close to Default (a half-step darker via --gray-4) so it can sit in the same row without disrupting hierarchy.

Simplified Typography

Three named text styles that bundle colour, size, and weight together so callers don't have to compose tokens at every site. Use them for body copy where the foundation's heading scale is too prominent.

The quick brown fox jumps over the lazy dog.

.text-default  ·  --text-color --size-4 regular

The quick brown fox jumps over the lazy dog.

.text-muted  ·  --gray-7 --size-4 regular

The quick brown fox jumps over the lazy dog.

.text-subtle  ·  --gray-8 --size-3 semibold

In context

Pit West — Schedule v3

Task assigned to Jane Smith.

NOT STARTED

Markup

<p class="text-default">…</p>
<p class="text-muted">…</p>
<p class="text-subtle">…</p>

Tooltips Messaging

Pure-CSS tooltips via the data-tooltip attribute — no JavaScript required. Three common uses: explaining a disabled state, naming an icon-only action, and adding context to a compact label.

DISABLED ACTION

Explains why a button is unavailable instead of leaving the user guessing.

ICON-ONLY BUTTON

Names the action when no visible label is present, as in toolbars and ribbons.

Avani Barr

COMPACT LABEL

Adds context to dense UI elements like chips and badges without expanding the layout.

Markup

<!-- Disabled button: data-tooltip on the wrapper span -->
<span data-tooltip="Complete all required form inputs before saving"
      style="display: inline-block; cursor: not-allowed;">
  <button class="primary" disabled style="pointer-events: none;">Save schedule</button>
</span>

<!-- Icon-only button: data-tooltip directly on the element -->
<button class="transparent" data-tooltip="Export to CSV" aria-label="Export to CSV">
  <i class="fa-solid fa-file-arrow-down"></i>
</button>

<!-- Chip: data-tooltip directly on the element -->
<span class="chip" data-tooltip="User currently assigned to this task">Avani Barr</span>

Icon Size Utilities

Named sizes so callers say small, medium, or large rather than resolving to a specific --size-N token at the call site. Apply alongside any icon class.

The three sizes

.icon-sm
--size-3  ·  0.75rem  ·  12 px
.icon-md
--size-4  ·  0.875rem  ·  14 px  ·  default for in-button icons
.icon-lg
--size-7  ·  1.5rem  ·  24 px  ·  use fa-regular

Large icons (.icon-lg) should use fa-regular rather than fa-solid — the lighter outline stroke reads more clearly at 24 px than a heavy fill. Note that Font Awesome Free only includes regular variants for ~163 icons (e.g. fa-bell, fa-bookmark, fa-folder, fa-circle-question, fa-envelope, fa-star, fa-user, fa-eye); fall back to fa-solid for icons that don't ship a regular weight.

Side-by-side comparison

.icon-sm
.icon-md
.icon-lg

Mixed icon types

The size classes work regardless of icon system — Font Awesome glyphs and the product layer's icon-* shells size identically.

Inside buttons

By default a button's icon already renders at --size-4 (medium). Use .icon-sm or .icon-lg to nudge density.

Markup

<i class="fa-solid  fa-bookmark icon-sm"></i>
<i class="fa-solid  fa-bookmark icon-md"></i>
<i class="fa-regular fa-bookmark icon-lg"></i>  <!-- regular weight at large size -->

Spacing Variables

Aliases of the foundation --size-* scale, named so developers can signal intent at the call site — --space-N for layout gaps, padding and margins; --size-N for element dimensions (icon size, font size). Same underlying values; different vocabulary.

The scale

Token Maps to rem px Typical use
--space-1px --size-1px — 1 Fixed pixel space
--space-2px --size-2px — 2 Fixed pixel space
--space-1 --size-1 0.25 4 Data-grid padding
--space-2 --size-2 0.5 8 Input / button padding
--space-3 --size-3 0.75 12 Field and input gaps
--space-4 --size-4 0.875 14 Equivalent to text size
--space-5 --size-5 1 16 —
--space-6 --size-6 1.25 20 —
--space-7 --size-7 1.5 24 —
--space-8 --size-8 1.75 28 —
--space-9 --size-9 2 32 Body / large component padding
--space-10 --size-10 2.5 40 Feature-card padding

When to use which

Use --space-N for…
  • Gaps between flex / grid items
  • Margins between content blocks
  • Padding inside containers
  • Page-level layout spacing (e.g. .page-layout)
Use --size-N for…
  • Icon dimensions (width / height / font-size)
  • Font sizing on headings and text utilities
  • Anywhere the value defines the element itself

In code

.layout-dual    { gap: var(--space-7); }
.page-layout    { margin: var(--space-8); }
.card           { padding: var(--space-4); }

.icon-md        { width: var(--size-4); height: var(--size-4); }
h1              { --font-size-base: var(--size-9); }

Optional t-shirt aliases

When a product only ever needs a small, fixed number of values per role — three to five distinct gaps, or a single small/medium/large step for padding on every card — the numeric ten-step scale can feel like overkill at the call site. The aliases below collapse the scale into per-role xs / sm / md / lg / xl tokens so the call site reads as intent rather than a number.

Adopt them only when the product genuinely works at three-to-five values for that role. Most products use just sm / md / lg; xs and xl are there when an extra step is needed. If you find yourself reaching past xl — or wanting a sixth step — drop back to the numeric --space-N scale and don't fight the t-shirts.

Gap
Token px Visual
--gap-xs4
--gap-sm8
--gap-md12
--gap-lg16
--gap-xl24
Margin
Token px Visual
--margin-xs8
--margin-sm12
--margin-md16
--margin-lg24
--margin-xl28
Padding
Token px Visual
--padding-xs4
--padding-sm8
--padding-md12
--padding-lg16
--padding-xl24

In code

.toolbar  { gap: var(--gap-sm); }
.card     { padding: var(--padding-md); }
section   { margin-bottom: var(--margin-lg); }

Why?

A scale of ten numbers tells you nothing about intent. When a reviewer reads gap: var(--size-7) they have to infer that 24 px is being used as a layout gap; gap: var(--space-7) says it directly. Existing --size-* references continue to work — the aliases are a vocabulary upgrade, not a breaking change.

Naming overrides

The foundation's Naming rules set the canonical vocabulary for the One Deswik design system — full words over abbreviations (background not bg, button not btn), danger over error, info over information. Individual products or teams sometimes need to depart from this — for parity with an existing codebase, for an internal vocabulary their team already speaks, or to express a different intent at the call site. The add-ons layer is where these per-team remaps belong.

Aliases never replace the canonical token. They sit alongside it, pointing at the same value. The foundation keeps exposing --background; an addon-layer override exposes --bg as a synonym. Both work; teams that prefer the shorter form use it locally without breaking anything outside their product.

Common remap patterns

Canonical Common alias Why teams adopt it
--background --bg Tighter syntax in densely-styled components.
button selector btn Parity with prior frameworks (Bootstrap, etc.) and existing markup.
--info · --active-primary --accent · --accent-primary Names the brand colour once when info-blue and primary-action are the same hue. Lets the team think in terms of "the accent" rather than two separate roles.
#fff on button text --accent-contrast Pairs with --accent-primary so changing the brand colour doesn't require revisiting the text colour at every call site.

The accent pattern

The most common remap is the accent pattern. A single semantic name stands in for both the brand action colour and the info hue when they coincide. The override defines --accent-primary for the fill (button backgrounds, focus rings, link colour) and --accent-contrast for the foreground text on top of that fill.

Override

/* In addons.css — product-specific override */
:root {
  --accent-primary:  var(--active-primary);  /* foundation brand colour */
  --accent-contrast: #fff;                   /* high-contrast text on accent fill */
}

Usage at the call site

/* before — hard-coded white text */
button.primary {
  background-color: var(--active-primary);
  color: #fff;
}

/* after — accent pattern */
button.primary {
  background-color: var(--accent-primary);
  color: var(--accent-contrast);
}

The payoff is when the brand changes. Updating --accent-primary in one place flows through every button, link, and chip that uses it; the matching --accent-contrast keeps foreground text readable without auditing every color: #fff declaration scattered across the product.

An alias adds a synonym; it never changes the canonical token. Don't redefine --background to a different colour and don't drop the foundation name. If a remap will be adopted by more than one product, promote it to the foundation rather than duplicating the alias in each team's add-on file.

Adding new add-ons

When a product team requests something that doesn't fit the foundation or the product layer, the candidate process is:

  1. Confirm the request isn't already covered by an existing token or component.
  2. Add the rule to src/addons.css with a short comment describing the use case.
  3. Document it on this page with a self-contained example.
  4. If the same add-on gets requested by a second product team, promote it into product-specific.css or the foundation.